package com.iafme.dto.res;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.systemframework.jackson.CustomDecimalSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author summer
 * @version 1.0
 * @date 2025/1/7 17:46
 */
@Data
@SearchBean(tables = " iafme_level l LEFT JOIN  iafme_project ic on l.projectId = ic.id ",orderBy = "l.createTime DESC")
public class EnterLevelResDTO implements Serializable {

    @DbField("l.id")
    private Integer id;

    @DbField("l.name")
    private String name;

    @DbField("l.createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    @DbField("l.amount")
    @JsonSerialize(using = CustomDecimalSerialize.class)
    private BigDecimal amount;

    @DbField("l.projectId")
    private Integer projectId;

    @DbField("ic.name")
    private String projectName;
}
